import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({

  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path:'/home',
      name:'home',
      component: () => import(/* webpackChunkName: "home" */ './views/home'),
      meta: { title: '快乐丢垃圾', canBack: true }
    },
    {
      path:'/search',
      name:'search',
      component: () => import(/* webpackChunkName: "search" */ './views/search'),
      meta: { title: '垃圾查查', canBack: true }
    },
    {
      path:'/notebook',
      name:'notebook',
      component: () => import(/* webpackChunkName: "notebook" */ './views/notebook'),
      meta: { title: '垃圾分类手册', canBack: true }
    },
    {
      path: '/answer',
      name: 'answer',
      component: () => import(/* webpackChunkName: "answer" */ './views/answer/index.vue'),
      meta: { title: '天天答题 日日中奖', canBack: true }
    },
    {
      path: '/failure',
      name: 'failure',
      component: () => import(/* webpackChunkName: "failure" */ './views/failure/index.vue'),
      meta: { title: '天天答题 日日中奖', canBack: true }
    },
    {
      path: '/myCard',
      name: 'myCard',
      component: () => import(/* webpackChunkName: "myCard" */ './views/myCard/index.vue'),
      meta: { title: '天天答题 日日中奖', canBack: true }
    },
    {
      path: '/lotto',
      name: 'lotto',
      component: () => import(/* webpackChunkName: "lotto" */ './views/lotto/index.vue'),
      meta: { title: '抽奖界面', canBack: true }
    }
  ]
});
